package com.wswy.wzcx.model.resp

import com.google.gson.annotations.SerializedName
import com.wswy.wzcx.module.validator.IValidator

class CaptchaData(@SerializedName("verifyType") val verifyType:String?,
                  @SerializedName("unique") val unique:String?,
                  @SerializedName("image") val image:String?,
                  @SerializedName("ticket") val ticket:String?) {

    fun isTCW() = verifyType == IValidator.TC

    fun isImgCaptcha() = verifyType == IValidator.IMG && !image.isNullOrEmpty()

    fun isPass() = verifyType == IValidator.PASS && !ticket.isNullOrEmpty()

}